// 开发环境接口配置
// JAVA Boot版本对应后端接口地址
// JAVA Cloud对应网关地址
const APIURl =
  process.env.NODE_ENV === "development"
    ? "/dev"
    : window.config.VUE_APP_BASE_API;
let proConfig = { ...window.config };
export default {
  APIURl: APIURl,
  timeout: process.env.NODE_ENV === "development" ? 1000000 : 1000000,
  WebSocketUrl:
    process.env.NODE_ENV === "development"
      ? window.config.VUE_APP_BASE_API.replace("http", "ws") +
        "/api/message/websocket"
      : proConfig.VUE_APP_BASE_WSS + "/api/message/websocket",
  comUploadUrl:
    process.env.NODE_ENV === "development"
      ? process.env.VUE_APP_BASE_API + "/api/file/Uploader"
      : proConfig.VUE_APP_BASE_API + "/api/file/Uploader",
  comUrl:
    process.env.NODE_ENV === "development"
      ? process.env.VUE_APP_BASE_API
      : proConfig.VUE_APP_BASE_API,
  // 本地文件预览
  filePreviewServer:
    process.env.NODE_ENV === "development"
      ? "http://localhost:30090"
      : proConfig.VUE_APP_BASE_URL + "/FileServer",
  // 大屏应用前端路径
  dataV:
    process.env.NODE_ENV === "development"
      ? "http://localhost:8100/DataV"
      : proConfig.VUE_APP_BASE_API + "/DataV",
  // 数据报表接口-java boot
  reportServer:
    process.env.NODE_ENV === "development"
      ? "http://localhost:30007"
      : proConfig.VUE_APP_BASE_API + "/ReportServer",
  // 数据报表接口-java cloud
  // reportServer: process.env.NODE_ENV === 'development' ? 'http://localhost:30000' : process.env.VUE_APP_BASE_API,
  // 报表前端
  report:
    process.env.NODE_ENV === "development"
      ? "http://localhost:8200"
      : proConfig.VUE_APP_BASE_URL + "/jsbos-report",

  localUrl: "http://127.0.0.1:3000",
  serverFrontUrl: `${proConfig.allIp}/jsbos-logistics-web`,
  serverOnlineUrl: `${proConfig.allIp}/jsbos-logistics-web`,
  previewLocalUrl: "http://127.0.0.1:30090/",
  previewServerUrl: `${proConfig.allIp}/FileServer/`,
};
